﻿<Window x:Class="GlobeDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:GlobeDemo"
        xmlns:shapes="clr-namespace:Microsoft.DwayneNeed.Shapes;assembly=Microsoft.DwayneNeed"
        Title="Globe Demo" Width="740" Height="450" Background="BlanchedAlmond">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>


        <Border x:Name="ViewportPanel" Grid.Row="0" Grid.Column="2" Grid.RowSpan="7" Background="Transparent">
            <Viewport3D x:Name="TheViewport3D" Grid.Row="1">
                <Viewport3D.Camera>
                    <PerspectiveCamera x:Name="camera"
                              UpDirection="0,1,0"
                              LookDirection="-4,-4,-4"
                              Position="200,200,200" />
                </Viewport3D.Camera>
                <ModelVisual3D>
                    <ModelVisual3D.Content>
                        <AmbientLight Color="White"/>
                    </ModelVisual3D.Content>
                </ModelVisual3D>
                <!--<shapes:Cone x:Name="TheSphere">
                    <Grid>
                        <local:WorldMap/>
                        <Canvas x:Name="MapOverlay" Visibility="Collapsed" Width="800" Height="393">
                            <Line Stroke="Red" StrokeThickness="4" X1="0" Y1="0" X2="0" Y2="393"/>
                            <Line Stroke="Red" StrokeThickness="4" X1="100" Y1="0" X2="0" Y2="393"/>
                            <Line Stroke="Red" StrokeThickness="4" X1="200" Y1="0" X2="0" Y2="393"/>
                            <Line Stroke="Red" StrokeThickness="4" X1="300" Y1="0" X2="0" Y2="393"/>
                            <Line Stroke="Red" StrokeThickness="4" X1="400" Y1="0" X2="0" Y2="393"/>
                            <Line Stroke="Red" StrokeThickness="4" X1="500" Y1="0" X2="0" Y2="393"/>
                            <Line Stroke="Red" StrokeThickness="4" X1="600" Y1="0" X2="0" Y2="393"/>
                            <Line Stroke="Red" StrokeThickness="4" X1="700" Y1="0" X2="0" Y2="393"/>
                            <Line Stroke="Red" StrokeThickness="4" X1="800" Y1="0" X2="0" Y2="393"/>
                        </Canvas>
                    </Grid>
                </shapes:Cone>-->
            </Viewport3D>
        </Border>
        <Canvas x:Name="TheCanvas" Grid.Row="0" Grid.Column="2" Grid.RowSpan="7"/>
        <Label Grid.Row="0" Grid.Column="0" Content="Shape:"/>
        <ComboBox x:Name="Shape"  Grid.Row="0" Grid.Column="1" SelectedIndex="0" SelectionChanged="Shape_SelectionChanged">
            <ComboBoxItem Content="Sphere"/>
            <ComboBoxItem Content="Cone"/>
            <ComboBoxItem Content="Cylinder"/>
            <ComboBoxItem Content="Ellipsoid"/>
            <ComboBoxItem Content="RomanSurface"/>
            <ComboBoxItem Content="Torus"/>
            <ComboBoxItem Content="SuperEllipsoid"/>
            <ComboBoxItem Content="SuperToroid"/>
            <ComboBoxItem Content="MobiusStrip"/>
            <ComboBoxItem Content="Figure8Torus"/>
            <ComboBoxItem Content="BoysSurface"/>
        </ComboBox>
        <Label Grid.Row="1" Grid.Column="0" Content="Mesh Resolution:"/>
        <ComboBox x:Name="MeshResolution"  Grid.Row="1" Grid.Column="1" SelectedIndex="0" SelectionChanged="MeshResolution_SelectionChanged">
            <ComboBoxItem Content="8x8"/>
            <ComboBoxItem Content="16x16"/>
            <ComboBoxItem Content="32x32"/>
            <ComboBoxItem Content="64x64"/>
            <ComboBoxItem Content="128x128"/>
        </ComboBox>
        <Label  Grid.Row="2" Grid.Column="0" Content="Cache Scale:"/>
        <ComboBox x:Name="CacheScaleCombo"  Grid.Row="2" Grid.Column="1" SelectedIndex="1" SelectionChanged="CacheScale_SelectionChanged">
            <ComboBoxItem Content="None"/>
            <ComboBoxItem Content="Auto"/>
            <ComboBoxItem Content="0.1"/>
            <ComboBoxItem Content="1"/>
            <ComboBoxItem Content="2"/>
            <ComboBoxItem Content="4"/>
            <ComboBoxItem Content="8"/>
        </ComboBox>
        <Label Grid.Row="3" Grid.Column="0" Content="Overlay:"/>
        <ComboBox x:Name="Overlay"  Grid.Row="3" Grid.Column="1" SelectedIndex="0" SelectionChanged="Overlay_SelectionChanged">
            <ComboBoxItem Content="None"/>
            <ComboBoxItem Content="Curves"/>
        </ComboBox>
    </Grid>
</Window>
